//
//  AlbumData.m
//  FLLGodOfCooking
//
//  Created by LL.F on 16/09/07
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "AlbumData.h"
#import "Albums.h"

@implementation AlbumData

+ (NSDictionary *)objectClassInArray{
    return @{@"albums" : [Albums class]};
}
- (void)setValue:(id)value forKey:(NSString *)key
{
    
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"albums"]) {
        NSMutableArray<Albums *>  *albumsArray = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            Albums *data = [Albums modelWithDic:dic];
            [albumsArray addObject:data];
        }
        _albums = albumsArray;
    }
}
@end
